<!DOCTYPE html>
<html lang="en-us">
  <head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="robots" content="noodp"/>
  <meta name="author" content="Auntie Tay">
  
  
  
  <link rel="prev" href="https://www.auntie.top/posts/first_one/" />
  
  <link rel="canonical" href="https://www.auntie.top/posts/matrix/" />
  <link rel="apple-touch-icon" sizes="180x180" href="../../apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="../../favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="../../favicon-16x16.png">
  <link rel="manifest" href="../../site.webmanifest">
  <link rel="mask-icon" href="../../safari-pinned-tab.svg" color="#5bbad5">
  
  
  
  <meta name="msapplication-TileColor" content="#da532c">
  <meta name="theme-color" content="#ffffff">
  <title>
       
       
           矩阵 | 邰老姨的博客
       
  </title>
  <meta name="title" content="矩阵 | 邰老姨的博客">
    
  
  <link rel="stylesheet" href="../../font/iconfont.css">
  <link rel="stylesheet" href="../../css/main.min.css">


  
  
 

<script type="application/ld+json">
 "@context" : "http://schema.org",
    "@type" : "BlogPosting",
    "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "https://www.auntie.top"
    },
    "articleSection" : "posts",
    "name" : "矩阵",
    "headline" : "矩阵",
    "description" : "矩阵是一种数据列表 此处A和B均为2*2的矩阵  矩阵加减 A+B = 每项对应两两相加
ab1,1 = a1,1+b1,1
ab1,2 = a1,2+b1,2
ab2,1 = a2,1+b2,1
ab2,2 = a2,2+b2,2
A-B = 每项对应两两相减
ab1,1 = a1,1-b1,1
ab1,2 = a1,2-b1,2
ab2,1 = a2,1-b2,1
ab2,2 = a2,2-b2,2
$$\begin{bmatrix}1 &amp; -3 \ 7 &amp; 5 \end{bmatrix} + \begin{bmatrix} 10 &amp; -8 \ 12 &amp; -2 \end{bmatrix}=\begin{bmatrix} (1+10) &amp; (-3 + -8) \ (7+12) &amp; (5+-2) \end{bmatrix}=\begin{bmatrix} 11 &amp; -11 \ 19 &amp; 3 \end{bmatrix}$$",
    "inLanguage" : "en-us",
    "author" : "Auntie Tay",
    "creator" : "Auntie Tay",
    "publisher": "Auntie Tay",
    "accountablePerson" : "Auntie Tay",
    "copyrightHolder" : "Auntie Tay",
    "copyrightYear" : "2019",
    "datePublished": "2019-03-08 14:56:35 &#43;0800 CST",
    "dateModified" : "2019-03-08 14:56:35 &#43;0800 CST",
    "url" : "https://www.auntie.top/posts/matrix/",
    "wordCount" : "237",
    "keywords" : [ "学习", "邰老姨的博客"]
}
</script>

</head>

  


  <body class="">
    <div class="wrapper">
        <nav class="navbar">
    <div class="container">
        <div class="navbar-header header-logo">
        	<a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-xihuan"></i></a>&nbsp;<a href="https://www.auntie.top">邰老姨的博客</a>
        </div>
        <div class="menu navbar-right">
                
                
                <a class="menu-item" href="../../posts/" title="">Blog</a>
                
                <a class="menu-item" href="../../categories/" title="">Categories</a>
                
                <a class="menu-item" href="../../tags/" title="">Tags</a>
                
                <a class="menu-item" href="../../about/" title="">About</a>
                
        </div>
    </div>
</nav>
<nav class="navbar-mobile" id="nav-mobile" style="display: none">
     <div class="container">
        <div class="navbar-header">
            <div>  <a href="javascript:void(0);" class="theme-switch"><i class="iconfont icon-xihuan"></i></a>&nbsp;<a href="https://www.auntie.top">邰老姨的博客</a></div>
            <div class="menu-toggle">
                <span></span><span></span><span></span>
            </div>
        </div>
     
          <div class="menu" id="mobile-menu">
                
                
                <a class="menu-item" href="../../posts/" title="">Blog</a>
                
                <a class="menu-item" href="../../categories/" title="">Categories</a>
                
                <a class="menu-item" href="../../tags/" title="">Tags</a>
                
                <a class="menu-item" href="../../about/" title="">About</a>
                
        </div>
    </div>
</nav>
    	 <main class="main">
          <div class="container">
      		
<article class="post-warp" itemscope itemtype="http://schema.org/Article">
    <header class="post-header">
        <h1 class="post-title" itemprop="name headline">矩阵</h1>
        <div class="post-meta">
                Written by <a itemprop="name" href="https://www.auntie.top" rel="author">Auntie Tay</a> with ♥ 
                <span class="post-time">
                on <time datetime=2019-03-08 itemprop="datePublished">March 8, 2019</time>
                </span>
                in
                <i class="iconfont icon-folder"></i>
                <span class="post-category">
                        <a href="https://www.auntie.top/categories/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0/"> 线性代数 </a>
                        
                </span>
        </div>
    </header>
    <div class="post-content">
        

        

        
        
     
          
          
          

          
          
          

          

<h3 id="矩阵是一种数据列表">矩阵是一种数据列表</h3>

<pre><code>此处A和B均为2*2的矩阵
</code></pre>

<h5 id="矩阵加减">矩阵加减</h5>

<p>A+B = 每项对应两两相加</p>

<p>ab<sub>1,1</sub> = a<sub>1,1</sub>+b<sub>1,1</sub></p>

<p>ab<sub>1,2</sub> = a<sub>1,2</sub>+b<sub>1,2</sub></p>

<p>ab<sub>2,1</sub> = a<sub>2,1</sub>+b<sub>2,1</sub></p>

<p>ab<sub>2,2</sub> = a<sub>2,2</sub>+b<sub>2,2</sub></p>

<p>A-B =  每项对应两两相减</p>

<p>ab<sub>1,1</sub> = a<sub>1,1</sub>-b<sub>1,1</sub></p>

<p>ab<sub>1,2</sub> = a<sub>1,2</sub>-b<sub>1,2</sub></p>

<p>ab<sub>2,1</sub> = a<sub>2,1</sub>-b<sub>2,1</sub></p>

<p>ab<sub>2,2</sub> = a<sub>2,2</sub>-b<sub>2,2</sub></p>

<p>$$\begin{bmatrix}1 &amp; -3 \ 7 &amp; 5 \end{bmatrix} + \begin{bmatrix} 10 &amp; -8 \ 12 &amp; -2 \end{bmatrix}=\begin{bmatrix} (1+10) &amp; (-3 + -8) \ (7+12) &amp; (5+-2) \end{bmatrix}=\begin{bmatrix} 11 &amp; -11 \ 19 &amp; 3 \end{bmatrix}$$</p>

<pre><code>矩阵加减必须为same size，如2行3列和3行5列的矩阵则无法相加减
</code></pre>

<h5 id="矩阵相乘">矩阵相乘</h5>

<p>被乘数矩阵的行乘以乘数矩阵的列：</p>

<p>row<sup>被乘数</sup><sub>1</sub> $\cdot$ column<sup>乘数</sup><sub>1</sub> = cell<sup>结果</sup><sub>1,1</sub></p>

<p>row<sup>被乘数</sup><sub>1</sub> $\cdot$ column<sup>乘数</sup><sub>2</sub> = cell<sup>结果</sup><sub>1,2</sub></p>

<p>row<sup>被乘数</sup><sub>2</sub> $\cdot$ column<sup>乘数</sup><sub>1</sub> = cell<sup>结果</sup><sub>2,1</sub></p>

<p>row<sup>被乘数</sup><sub>2</sub> $\cdot$ column<sup>乘数</sup><sub>2</sub> = cell<sup>结果</sup><sub>2,2</sub></p>

<p>由</p>

<p>row<sup>被乘数</sup><sub>1</sub> $\cdot$ column<sup>乘数</sup><sub>1</sub>  = a<sub>1,1</sub> $\cdot$ b<sub>1,1</sub> + a<sub>1,2</sub> $\cdot$ b<sub>2,1</sub></p>

<p>则</p>

<p>A $\cdot$ B的情况：</p>

<p>ab<sub>1,1</sub> = (a<sub>1,1</sub> $\cdot$ b<sub>1,1</sub> + a<sub>1,2</sub> $\cdot$ b<sub>2,1</sub>)
ab<sub>1,2</sub> = (a<sub>1,1</sub> $\cdot$ b<sub>1,2</sub> + a<sub>1,2</sub> $\cdot$ b<sub>2,2</sub>)
ab<sub>2,1</sub> = (a<sub>2,1</sub> $\cdot$ b<sub>1,1</sub> + a<sub>2,2</sub> $\cdot$ b<sub>2,1</sub>)
ab<sub>2,2</sub> = (a<sub>2,1</sub> $\cdot$ b<sub>1,2</sub> + a<sub>2,2</sub> $\cdot$ b<sub>2,2</sub>)</p>

<p>$$
\begin{bmatrix}
1 &amp; -3 <br />
7 &amp;5
\end{bmatrix}
\cdot
\begin{bmatrix}
10 &amp; -8 <br />
12 &amp; -2
\end{bmatrix} =
\begin{bmatrix}
(1\cdot10)+(-3 \cdot 12) &amp; (1 \cdot -8)+(-3 \cdot -2) <br />
(7\cdot10)+(5 \cdot 12) &amp; (7 \cdot -8)+(5 \cdot -2)
\end{bmatrix} =
\begin{bmatrix}
-26 &amp; -2 <br />
130 &amp; -66
\end{bmatrix}
$$</p>

<p>如果矩阵阶层为[2, 3]和[3,2]，则</p>

<p>row<sup>被乘数</sup><sub>1</sub> $\cdot$ column<sup>乘数</sup><sub>1</sub>  = a<sub>1,1</sub> $\cdot$ b<sub>1,1</sub> + a<sub>1,2</sub> $\cdot$ b<sub>2,1</sub>+ a<sub>1,3</sub> $\cdot$ b<sub>3,1</sub></p>

<p>做乘法操作也是一样，所以需要考虑到，何种情况可以做矩阵的相乘，何种情况不能</p>

<p>综上还可以知道矩阵相乘，顺序不能随意调换</p>

<p>$$ A \cdot B \ne B \cdot A $$</p>

<h5 id="矩阵可乘">矩阵可乘</h5>

<p>当A[2,3] $\cdot$ B[3,2] 时， 所得矩阵C为2行2列的。
所以猜想当有 A[n, a] 、B[b, m] 时
如果 a=b
则矩阵A、B可以相乘
并且，结果矩阵C是为n行m列的矩阵</p>

<pre><code>fuckit
</code></pre>

    </div>

    <div class="post-copyright">
             
            <p class="copyright-item">
                <span>Author:</span>
                <span>Auntie Tay </span>
                </p>
            
           
             
            <p class="copyright-item">
                    <span>Link:</span>
                    <a href=https://www.auntie.top/posts/matrix/>https://www.auntie.top/posts/matrix/</span>
            </p>
            
            
    </div>

  
    <div class="post-tags">
        
            <section>
            <i class="iconfont icon-tag"></i>Tag(s): 
            
            <span class="tag"><a href="https://www.auntie.top/tags/%E5%AD%A6%E4%B9%A0/">
                    #学习</a></span>
            
            </section>
        
        <section>
                <a href="javascript:window.history.back();">back</a></span> · 
                <span><a href="https://www.auntie.top">home</a></span>
        </section>
    </div>

    <div class="post-nav">
        
        <a href="https://www.auntie.top/posts/first_one/" class="prev" rel="prev" title="First_one"><i class="iconfont icon-left"></i>&nbsp;First_one</a>
         
        
    </div>

    <div class="post-comment">
          
                 
          
    </div>
</article>
          </div>
		   </main>
      <footer class="footer">
    <div class="copyright">
        &copy;
        
        <span itemprop="copyrightYear">2011 - 2019</span>
        
        <span class="with-love">
    	 <i class="iconfont icon-love"></i> 
         </span>
         
            <span class="author" itemprop="copyrightHolder"><a href="https://www.auntie.top">Auntie Tay</a> | </span> 
         

         
		  <span>Powered by <a href="https://gohugo.io/" target="_blank" rel="external nofollow">Hugo</a> & <a href="https://github.com/liuzc/leaveit" target="_blank" rel="external nofollow">LeaveIt</a></span> 
    </div>
</footer>












    
    
    <script src="../../js/vendor_no_gallery.min.js" async=""></script>
    
  





  <script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js"
  integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" 
  crossorigin="anonymous"></script>
  <script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js"
  integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe"
  crossorigin="anonymous"
  onload="renderMathInElement(document.body,{delimiters: [{left: '$$', right: '$$', display: true},{left: '$', right: '$', display: false}]});"></script>
  



     </div>
  </body>
</html>
